package com.sky.mapper;

import com.sky.entity.OrderDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author luo20
* @description 针对表【order_detail(订单明细表)】的数据库操作Mapper
* @createDate 2025-07-22 13:28:55
* @Entity com.sky.entity.OrderDetail
*/
public interface OrderDetailMapper extends BaseMapper<OrderDetail> {
    /**
     *
     * 批量插入订单明细数据
     * @param orderDetailList
     * @return
     */
    Integer saveBath(@Param("orderDetailList") List<OrderDetail> orderDetailList);

    /**
     * 根据订单id查询订单明细
     */
    @Select("select * from order_detail where order_id = #{orderId}")
    List<OrderDetail> getOrderDetailByOrderId(Long orderId);
}




